//
//  MyFavorBook.m
//  奇阅
//
//  Created by 奇阅科技 on 14-11-3.
//  Copyright (c) 2014年 奇阅科技. All rights reserved.
//

#import "MyFavorBook.h"
#import "Config.h"
@implementation MyFavorBook
+(NSString *)getTableName
{
    return @"MyFavorBook";
}
+(MyFavorBook *)getFromDict:(NSDictionary *)dict{
    MyFavorBook *book = [MyFavorBook new];
    UserAccount *user = [UserAccount currentAccount];
    book.uid = user.uid;
    book.book = [Book getFromDict:dict];
    book.articleid = book.book.articleid;
    book.wordtotal = [dict objectForKey:@"wordtotal"];
    book.lastUpdateInfo = [dict objectForKey:@"subhead"];
    book.finishflag = [[dict objectForKey:@"finishflag"] boolValue];
    return book;
}
//更新 数据
-(void)upDateNew:(MyFavorBook *)newBook{
    self.wordtotal = newBook.wordtotal;
    [self.book upDateNew:newBook.book];
    self.lastUpdateInfo = newBook.lastUpdateInfo;
    self.finishflag = newBook.finishflag;
}
@end
